package com.sun.btrace.cmd;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class ls_java extends CommandCase{
	public void realCMDAction(String...str){
		String s="";
		Process process;
		try {
			process = Runtime.getRuntime().exec("jps");
			BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(process.getInputStream()));
			 while((s=bufferedReader.readLine()) != null)
			 System.out.println(s);
			 process.waitFor();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	@Override
	public void help(){
		String help="just can list localhost java pid" ;
		context.println(help);
	}
	public static void main(String[] ss)  {
		new ls_java().cmd(ss);
	}
}
